#ifndef FILSYS_H
#define FILSYS_H

#include "types.h"

/* @(#)filsys.h	1.2 */

/*
 * Structure of the super-block
 */

#define	SUPERB	((daddr_t)1)	/* block number of the super block */
#define	NICINOD	100		/* number of superblock inodes */
#define	NICFREE	50		/* number of superblock free blocks */

struct	filsys {
	unsigned short	s_isize;	/* size in blocks of i-list */
	daddr_t		s_fsize;	/* size in blocks of entire volume */
	short		s_nfree;	/* number of addresses in s_free */
	daddr_t		s_free[NICFREE];/* free block list (stack) */
	short		s_ninode;	/* number of i-nodes in s_inode */
	ino_x		s_inode[NICINOD];/* free i-node list (stack) */
	byte		s_flock;	/* lock during free list manipulation */
	byte		s_ilock;	/* lock during i-list manipulation */
	byte		s_fmod;		/* super block modified flag */
	byte		s_ronly;	/* mounted read-only flag */
	time_t		s_time;		/* last super block update */
	daddr_t		s_tfree;	/* total free blocks*/
	ino_x		s_tinode;	/* total free inodes */
	short		s_m;		/* interleave factor */
	short		s_n;		/* " " (cylinder size) */
	char		s_fname[6];	/* file system name */
	char		s_fpack[6];	/* file system pack name */
};


#endif /*FILSYS_H*/
